<template>
	<div>
		<h1>阅卷管理</h1>
		<el-table :data="datas.data" style="width: 100%">
			<el-table-column type="index" label="序号" width="180" />
			<el-table-column prop="classroom" label="班级" width="280" />
			<el-table-column prop="address" label="操作">
				<template #default="scope">
					<el-button size="small" type="primary" @click="handlePath(scope.row)">详情</el-button>
				</template>
			</el-table-column>
		</el-table>
	</div>
</template>

<script setup>
import { useRouter, useRoute } from 'vue-router';
import { ref, onMounted, reactive, toRefs } from 'vue';
import { useUserInfo } from '/@/stores/userInfo';
import { usePaperManage } from '/@/api/papermanage';
import { storeToRefs } from 'pinia';
const $router = useRouter();
const stores = useUserInfo();
const { userInfos } = storeToRefs(stores);
const datas = reactive({
	data: [],
});

onMounted(() => {
	getDataList();
	console.log(userInfos.value.id, '5555555555555');
});

function getDataList() {
	usePaperManage()
		.getAcademyClass({ id: userInfos.value.id })
		.then((res) => {
			console.log(res.data, '111111111111');
			datas.data = res.data;
		});
}
function handlePath(value) {
	console.log(value);
	$router.push({path:'/exam/scoring_manage/manageDetail',params:value})
}
</script>

<style scoped>
</style>